home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_riv_ambroadway.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  96 lines

  1. # Jones 3D Cog Script
  2. #
  3. # RIV_AmbRoadWay.cog
  4. #
  5. # Plays random ambient sounds at random positions and drops
  6. # snow at all the positions all the time.
  7. #
  8. # [TRM]
  9. #
  10. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  11. # ========================================================================================
  12.  
  13. symbols
  14.  
  15.     message        entered
  16.     message     pulse
  17.  
  18.     thing        soundPos0        nolink
  19.     thing        soundPos1        nolink
  20.     thing        soundPos2        nolink
  21.     thing        soundPos3        nolink
  22.     thing        soundPos4        nolink
  23.     
  24.     sector      start_Amb1      linkID=1
  25.     sector      start_Amb2      linkID=1
  26.     sector      start_Amb3      linkID=1
  27.     
  28.     sector      stop_Amb1       linkID=0
  29.     sector      stop_Amb2       linkID=0
  30.     sector      stop_Amb3       linkID=0
  31.  
  32.     sound        ambient0=shw_amb1.wav   local
  33.     sound        ambient1=shw_amb2.wav   local
  34.     sound        ambient2=shw_amb3.wav   local
  35.     sound        ambient3=shw_amb4.wav   local
  36.     sound        ambient4=shw_amb5.wav   local
  37.     sound        ambient5=shw_amb6.wav   local
  38.     sound        ambient6=shw_amb7.wav   local
  39.     
  40.     template    tpl_Snow=skitosnow      local
  41.     
  42.     int         playing=0               local
  43.     
  44.     int         randNum                 local
  45.     sound       snd_Wolf=fol_wolf_talk.wav      local
  46.     
  47. end
  48.  
  49. # ========================================================================================
  50.  
  51. code
  52.  
  53. entered:
  54.  
  55.     if((GetSenderID() == 1) && (playing == 0))
  56.     {
  57.         playing = 1;
  58.         setpulse(2.0);
  59.     }
  60.     
  61.     if(GetSenderID() == 0)
  62.     {
  63.         playing = 0;
  64.         SetPulse(0.0);
  65.     }
  66.     
  67.     return;
  68.  
  69. # ========================================================================================
  70.  
  71. pulse:
  72.  
  73.     PlaySoundThing(ambient0[RandBetween(0, 6)], soundPos0[RandBetween(0, 4)], 1.0, 15, 30, 0);
  74.     
  75.     randNum = RandBetween(1, 5);
  76.     
  77.     if(randNum == 10)
  78.     {
  79.         PlaySoundThing(snd_Wolf, soundPos0[RandBetween(0, 7)], 0.5, 15, 30, 0);
  80.     }
  81.     
  82.     if(GetPerformanceLevel() >= 2)
  83.     {
  84.         CreateThing(tpl_Snow, soundPos0);        
  85.         CreateThing(tpl_Snow, soundPos1);        
  86.         CreateThing(tpl_Snow, soundPos2);        
  87.         CreateThing(tpl_Snow, soundPos3);        
  88.         CreateThing(tpl_Snow, soundPos4);
  89.     }
  90.     
  91.     return;
  92.  
  93. # ========================================================================================
  94.  
  95. end
  96.